class LunDM {
  LunDM({
    required this.id,
    required this.image,
    required this.applicationIds,
    required this.video,
  });

  final int id;
  final String image;
  final String applicationIds;
  final Video? video;

  static List<LunDM> fromList(List json){
    return List.from(json).map((e) => LunDM.fromJson(e)).toList();
  }

  factory LunDM.fromJson(Map<String, dynamic> json){
    return LunDM(
      id: json["id"] ?? 0,
      image: json["image"] ?? "",
      applicationIds: json["application_ids"] ?? "",
      video: json["video"] == null ? null : Video.fromJson(json["video"]),
    );
  }

}

class Video {
  Video({
    required this.id,
    required this.isVertical,
    required this.isJumpMiniprogram,
    required this.isJumpWeb,
    required this.minAge,
    required this.advOrigin,
  });

  final int id;
  final num isVertical;
  final num isJumpMiniprogram;
  final num isJumpWeb;
  final num minAge;
  final String advOrigin;

  factory Video.fromJson(Map<String, dynamic> json){
    return Video(
      id: json["id"] ?? 0,
      isVertical: json["is_vertical"] ?? 0,
      isJumpMiniprogram: json["is_jump_miniprogram"] ?? 0,
      isJumpWeb: json["is_jump_web"] ?? 0,
      minAge: json["min_age"] ?? 0,
      advOrigin: json["adv_origin"] ?? "",
    );
  }

}
